<div class="form-group col-sm-2">

    <!-- Id Field -->
<div class="form-group">
    {!! Form::label('id', 'Id:') !!}
    <p>{!! $distributionStatistics->id !!}</p>
</div>

<!-- Date Field -->
<div class="form-group">
    {!! Form::label('date', '日期:') !!}
    <p>{!! $distributionStatistics->date !!}</p>
</div>

<!-- Type Field -->
<div class="form-group">
    {!! Form::label('type', '类型:') !!}
    <p>
        @if ($distributionStatistics->type == 1)
            天统计
        @elseif ($distributionStatistics->type == 2)
            周统计
        @elseif ($distributionStatistics->type == 3)
            月统计
        @elseif ($distributionStatistics->type == 4)
            季统计
        @elseif ($distributionStatistics->type == 5)
            年统计
        @elseif ($distributionStatistics->type == 6)
            全统计
        @endif
    </p>
</div>

<!-- User Id Field -->
<div class="form-group">
    {!! Form::label('user_id', '昵称:') !!}
    <p>{!! $distributionStatistics->user->nickname !!}</p>
</div>
<!-- User Id Field -->
<div class="form-group">
    {!! Form::label('user_id', '名字:') !!}
    <p>{!! $distributionStatistics->user->name !!}</p>
</div>
<!-- User Id Field -->
<div class="form-group">
    {!! Form::label('user_id', '手机:') !!}
    <p>{!! $distributionStatistics->user->phone !!}</p>
</div>

<!-- Pairing Number Field -->
<div class="form-group">
    {!! Form::label('pairing_number', '配单数量:') !!}
    <p>{!! $distributionStatistics->pairing_number !!}</p>
</div>

<!-- Verify Number Field -->
<div class="form-group">
    {!! Form::label('verify_number', '验单数量:') !!}
    <p>{!! $distributionStatistics->verify_number !!}</p>
</div>

<!-- Shipping Number Field -->
<div class="form-group">
    {!! Form::label('shipping_number', '配送数量:') !!}
    <p>{!! $distributionStatistics->shipping_number !!}</p>
</div>


<!-- Shipping Number Field -->
<div class="form-group">
    {!! Form::label('shipping_overtime_number', '超时配送数量:') !!}
    <p>{!! $distributionStatistics->shipping_overtime_number !!}</p>
</div>

<!-- Created At Field -->
<div class="form-group">
    {!! Form::label('created_at', '创建时间:') !!}
    <p>{!! $distributionStatistics->created_at !!}</p>
</div>

<!-- Updated At Field -->
<div class="form-group">
    {!! Form::label('updated_at', '更新时间:') !!}
    <p>{!! $distributionStatistics->updated_at !!}</p>
</div>

</div>
<?php
$tables = [
    'pairing_order_ids'=>'配单列表',
    'verify_order_ids'=>'验单列表',
    'shipping_order_ids'=>'配送列表',
];
?>
<div class="form-group col-sm-10" style="background: mintcream">

    @foreach($tables as $kk=>$vv)
    <div class="box-body">
        {{$vv}}
        <table class="table table-responsive" id="statistics-table">
            <thead>
            <th>用户昵称</th>
            <th>收货人名称</th>
            <th>收货人地址</th>
            <th>收货人手机</th>
            <th>编号</th>
            <th>状态</th>
            <th>商品总数</th>
            <th>总价格</th>
            <th>使用积分</th>
            <th>支付金额</th>
            <th>是否自提</th>
            <th>配送区域</th>
            <th>配送时间</th>
            <th>实际送达时间</th>
            <th>支付时间</th>
            </thead>
            <tbody>
            @foreach($distributionStatistics->info[$kk] as $v)
                <tr>
                    <td>{{ $orders[$v]->user->nickname }}</td>
                    @if(isset($orders[$v]->address))
                        <td>{{ $orders[$v]->address->name }}</td>
                        <td>{{ $orders[$v]->address->address }}</td>
                        <td>{{ $orders[$v]->address->phone }}</td>
                    @else
                        <td>无</td>
                        <td>无</td>
                        <td>无</td>
                    @endif
                    <td>{{ $orders[$v]->sn }}</td>
                    <td>
                        @if($orders[$v]->status==-1)
                            已取消
                        @elseif($orders[$v]->status==1)
                            待付款
                        @elseif($orders[$v]->status==2)
                            <span style="color:#E26A72;">待发货</span>
                        @elseif($orders[$v]->status==3)
                            配送中
                        @elseif($orders[$v]->status==4)
                            <span style="color:#94C572;">已收货</span>
                        @elseif($orders[$v]->status==5)
                            <span style="color:#94C572;">已完成</span>
                        @elseif($orders[$v]->status==11)
                            <span style="color:#E6B600;">退款申请</span>
                        @elseif($orders[$v]->status==12)
                            退款成功
                        @elseif($orders[$v]->status==13)
                            退款失败
                        @endif
                    </td>
                    <td>{!! $orders[$v]->goods_number !!}</td>
                    <td>{!! $orders[$v]->price !!}</td>
                    <td>{!! $orders[$v]->use_integral !!}</td>
                    <td>{!! $orders[$v]->pay_money !!}</td>
                    <td>{!! $orders[$v]->will_take==1?'自提':'配送' !!}</td>
                    <td>{!! $orders[$v]->shipping_area !!}</td>
                    <td>{!! $orders[$v]->shipping_at !!}</td>
                    <td style="color: {{ strtotime($orders[$v]->real_shipping_end_at)>strtotime($orders[$v]->shipping_end_at)?'red':'black' }}">{!! $orders[$v]->real_shipping_end_at !!}</td>
                    <td>{!! $orders[$v]->pay_at !!}</td>
                </tr>
            @endforeach
            </tbody>
        </table>
    </div>
    <div style="height: 10px;background-color: white"></div>
    @endforeach
</div>